#ifndef _APP_H_
#define _APP_H_

#include "SensorAFE.h"
#include "SensorAFE_NO2.h"
#include "CommunicationDevice.h"
#include "TemperatureSensor.h"
#include "EEPROM.h"
#include "ota.h"

//#define USE_4G_MODE
#define USE_ESP32C3

class APP {
private:
    CommunicationDevice     communicationDevice;
    SensorAFE               AFE;
    SensorAFE_NO2           AFE_auxiliary;
    TemperatureSensor       temperatureSensor;
    OTA                     ota;

    WaterLevelCalculationParameters_Typedef   param = {0};

    static char* BuildJsonStr(WaterLevelCalculationParameters_Typedef* data);
    static void task_perse_msg_from_communication(void* arg);
    static void task_atm(void* arg);
    static void task_tube_pressure(void* arg);
    static void task_Temperature(void* arg);
    static void task_WaterLevelCalculation(void* arg);
    static void task_MQTT_communication(void* arg);
    static void task_OTA(void* arg);
    static void task_heartbeat(void* arg);
public:
    APP();
    ~APP();

    void run();
};

#endif
